package com.daiyang.javabasics.深度拷贝和浅拷贝;

public class CopyTest {
}
class Person implements Cloneable{
    private String name;
    int [] arr = {1,2,3,4,5,6,7,8,9};
    private int age;
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public Person clone() {
        try {
            Person person = (Person) super.clone();
            person.arr = arr.clone();
            return person;
        } catch (CloneNotSupportedException e) {
            return  null;
        }

    }
}